{% extends 'base.html' %}

{% block body %}

<h2>Detail</h2>

<a href="/">&lt&ltback</a>

{% if session.logged_in %}
    <h3>{{ entry.title }}</h3>

    <p>
    <a class=createtime>{{ entry.createtime }}</a>

    {% for target in targetlist %}
        <a class=target href="/targetindex?target_name={{ target }}">&lt;{{ target }}&gt;</a>
    {% endfor %}
    </p>

    <pre class=text>{{ entry.text|safe }}</pre>

    <a href="/edit?id={{ entry.id }}">edit</a>
    <a href="javascript:void(0)" onclick="delete_confirm({{ entry.id }})">delete</a>

{% else %}
    <p class=error>
    <strong>Error:</strong>
    log in please!!
    </p>

{% endif %}

{% endblock %}
